package com.yzs.mvidemo.demo;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.yzs.base.utils.ImageLoader;
import com.yzs.core.ARouterUrl;
import com.yzs.core.base.CoreJavaBaseVBVMActivity;
import com.yzs.mvidemo.databinding.ActivityMainBinding;

/**
 * author : yzs
 * date   : 2022/1/1310:54
 * desc   :
 */
@Route(path = ARouterUrl.Demo.URL_DEMO_DEMO_JAVA)
public class DemoJavaActivity extends CoreJavaBaseVBVMActivity<ActivityMainBinding, DemoVM> {


    @Override
    public void init(@Nullable Bundle savedInstanceState) {
        getBinding().tv.setText("234567890-3456789034567890-");
        ImageLoader.INSTANCE.loadImage(DemoJavaActivity.this, getBinding().iv, "https://www.baidu.com/img/flexible/logo/pc/result.png");
    }

    @Override
    public void observe() {
        setPageStateLoadingUI(vm.getLiveDataViewStates());
        vm.dispatch();
    }
}
